package com.phillong.strategy;

/**
 * @author zhangpeng
 */
public class DuckTest {

    public static void main(String[] args) {

        //测试普通调用
        Duck yellowDuck = new YellowDuck();
        yellowDuck.performFly();
        yellowDuck.performQuack();

        Duck modelDuck = new ModelDuck();
        modelDuck.performQuack();
        modelDuck.performFly();
        modelDuck.setFlyBehavior(new FlyWithRocket());
        modelDuck.performFly();
    }
}
